<template>
    <div v-if="route.query.orderId">
        <Detail></Detail>
    </div>
    <div v-else>
        <AllOrder></AllOrder>
    </div>
</template>

<script setup lang="ts">
// 引入路由
import { useRoute } from 'vue-router';
// 引入子组件
import Detail from './detail/index.vue'
import AllOrder from './allOrder/index.vue'

// 获取路由对象
let route = useRoute();
</script>

<style scoped></style>